#pragma once

#include "cocos2d.h"

class BaseScene;

class BaseEntity : public cocos2d::Node
{
public:
    BaseEntity()
        :scene(nullptr)
        ,disappear(false)
        ,inScreen(true)
    {
    }
	virtual ~BaseEntity() {}
	virtual void run(long tick) = 0;
    virtual void render(long tick) = 0;

    virtual void addToScene(BaseScene *scene);
    virtual void removeFromScene();

    int id;
    bool disappear;
    bool inScreen;
    BaseScene *scene;
};